package cc.vvshop.demo1;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import static org.junit.Assert.*;

/**
 * Created by tomas on 16-6-16.
 */
@RunWith(SpringJUnit4ClassRunner.class)
//运行时的spring配置文件
@ContextConfiguration("classpath:spring-demo1.xml")
public class AccountServiceImplTest {

    @Autowired
    private AccountService accountService;

    @Test
    public void transfer() throws Exception {
        accountService.transfer("aaa","bbb" ,200);
    }

    @Test
    public void transferNoTranscation() throws Exception {
        accountService.transferNoTranscation("aaa","bbb" ,200);
    }


}